/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2019-2019.
 * Description: coredump on syscall exit or exit_group
 * Author: nixiaoming
 * Create: 2019-03-02
 */
#ifndef _RTOS_COREDUMP_ON_EXIT_H_
#define _RTOS_COREDUMP_ON_EXIT_H_
#include <linux/rtos_mm_types.h>

#ifdef CONFIG_RTOS_COREDUMP_ON_EXIT
void init_dump_on_exit(struct rtos_mm_struct *rtos_mm);
#define NO_DUMP_ON_EXIT 0
#define NEED_DUMP_ON_EXIT 1
#define BEING_DUMP_ON_EXIT 2
void coredump_on_exit(int sig, int error_code, bool is_group_exit);
extern void exit_mm_wait_dump_start(struct mm_struct *mm);
#else /* !CONFIG_RTOS_COREDUMP_ON_EXIT */
#define init_dump_on_exit(x) do {} while (0)
static inline void coredump_on_exit(int sig, int error_code, bool is_group_exit)
{
}

static inline void exit_mm_wait_dump_start(struct mm_struct *mm)
{
}
#endif /* CONFIG_RTOS_COREDUMP_ON_EXIT */
#endif

